import http from "@/utils/http";
export default {
    getList: (data: HttpPayload.GetStaffList): Promise<Vm.ApiStatus> => http<HttpPayload.GetStaffList, Vm.ApiStatus>
        ({ url: "/staff/list", method: "post", data }),
    getDictionary: (): Promise<Array<Vm.Dictionary>> => http<null, Array<Vm.Dictionary>>({ url: "/dictionary/all" }),
    dimission: (id: number): Promise<null> => http<number, null>({ url: "/staff/dimission/" + id }),
    reinstate: (id: number): Promise<null> => http<number, null>({ url: "/staff/reinstate/" + id }),
    update: (data: HttpPayload.StaffEdit): Promise<null> => http<HttpPayload.StaffEdit, null>({ url: "/staff/update", method: "post", data }),
    add: (data: HttpPayload.StaffEdit): Promise<number> => http<HttpPayload.StaffEdit, number>({ url: "/staff/add", method: "post", data }),
    getListByCategory:(stf_category:number):Promise<Vm.Staff[]> => http<number,Vm.Staff[]>({url:"/staff/listbycategory/"+stf_category})
    
}